﻿using System;
using System.Collections.Generic;

namespace SOEI.Solution.Customized.Dtos
{
    public class PurQualificationInfoListDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }

        public List<BuyersInformation> buyersInformations { get; set; }

        //申请时间--提交申请时间
        public string TJSJ { get; set; }

        /// <summary>
        /// 申请状态代码
        /// </summary>
        public ApplyStatus SQZTDM { get; set; }

        /// <summary>
        /// 有效日期【过期时间(剩余时间)】
        /// </summary>
        public string GQSJ { get; set; }

        //购资编码

        /// <summary>
        /// 合同登记号
        /// </summary>
        public string HTDJH { get; private set; }

        //是否网签:HTDJH为空：未网签，值存在：已网签
        public string ISWQ
        {
            get
            {
                if (string.IsNullOrWhiteSpace(this.HTDJH))
                {
                    return "否";
                }
                else
                {
                    return "是";
                }
            }
        }

        /// <summary>
        /// 申请状态名称
        /// </summary>
        public string SQZTMC
        {
            get
            {
                switch (this.SQZTDM)
                {
                    case ApplyStatus.UnSubmitted:
                        return "未提交";
                    case ApplyStatus.Auditing:
                        return "审查中";
                    case ApplyStatus.AuditPassed:
                        return "审查通过";
                    case ApplyStatus.AuditUnPassed:
                        return "审查未通过";
                    case ApplyStatus.Returned:
                        return "已退回";
                    case ApplyStatus.FirstAuditing:
                        return "初审审查中";
                    case ApplyStatus.Empty:
                        return "";
                    default:
                        return "";
                }

            }
        }

        /// <summary>
        /// 说明
        /// </summary>
        public string SM { get; set; }

        /// <summary>
        /// 录入人
        /// </summary>
        public string LRRXM { get; set; }

        /// <summary>
        /// 录入时间
        /// </summary>
        public DateTime? LRSJ { get; set; }

        ////审核时间--生效时间
        //public string SXSJ { get; set; }

    }

    public class BuyersInformation
    {
        /// <summary>
        /// 购房人姓名
        /// </summary>
        public string GFRXM { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string ZJHM { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string LXDH { get; set; }
    }
}
